package com.softWang.common.service.email;

import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.File;
import java.util.List;
import java.util.Map;

/**
 * 邮件基于thymeleaf模板的请求DTO
 */
@Validated
@Data
public class EmailTemplateRequestDTO {

    @NotBlank(message = "subject不能为空")
    private String subject;

    @NotBlank(message = "templateName不能为空")
    private String templateName;//邮件模板名称

    private Map<String, Object> params;//模板参数

    @NotEmpty(message = "to不能为空")
    private List<@NotBlank(message = "收件人不能为空") String> to;//收件人

    private List<String> cc;//抄送人

    private List<String> bcc;//密送人

    private List<File> attachments;//附件
}
